import java.util.Arrays;
import java.util.Random;
//冒泡排序
public class test2 {
    public static void main(String[] args) {
        int[] a = method();

        for(int i = 0; i < a.length; i++){
            for(int j = 0; j < a.length-1; j++){
                if(a[j] > a[j+1]){
                    int t = a[j];
                    a[j] = a[j+1];
                    a[j+1] = t;
                }
            }
        }
        System.out.println(Arrays.toString(a));
    }
    static int[] method(){
        int[] a = new int[5 + new Random().nextInt(6)];

        for(int i = 0; i < a.length; i++){
            a[i] = new Random().nextInt(100);
        }
        return a;
    }
}
